/*!
 
 @header SimpleSeg.h
 
 @abstract 分段选择器
 
 @author Created by MXCF on 16/3/21.
 
 @version 1.08 16/3/21 Creation
 
 */

#import <UIKit/UIKit.h>
@protocol SimpleSegDelegate;
@interface SimpleSeg : UIView{
    UIImageView *bgview;
}
@property(nonatomic,unsafe_unretained)id<SimpleSegDelegate>segdelegate;
@property(nonatomic,strong)UIScrollView *bgview;
@property(nonatomic,assign)BOOL isNotFitForFullDeviceWidth;
@property(nonatomic,assign)BOOL isDefineAnimate;
-(id)initWithFrame:(CGRect)frame delegate:(id)delegate;
-(id)initWithFrame:(CGRect)frame delegate:(id)delegate isNotFitForFullWidth:(BOOL)isNotFitForFullWidth;
/*!
 *  @brief 更新titile
 *
 *  @param array 标题数组
 */
-(void)updateTitles:(NSArray*)array;
/*!
 *  @brief 设置选择的下标
 *
 *  @param index 下标
 */
-(void)setSelectIndex:(int)index;
/*!
 *  @brief 设置选择的下标
 *
 *  @param index 下标
 */
-(void)setSelect:(NSInteger)index;
/*!
 *  @brief 刷新视图
 */
-(void)reload;
/*!
 *  @brief 刷新badgeNum
 */
-(void)reloadBadgeNum;
@end
@protocol SimpleSegDelegate <NSObject>
@optional
-(void)simpleSeg:(SimpleSeg*)simpleseg didselectIndex:(NSInteger)index;
-(NSArray*)badgeNumForSeg;
@required
-(NSArray*)titlesForSeg;
@end
